﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MyPSDALayer;
using MyPS.Models;

namespace MyPS.Controllers
{
    public class TechLibController : Controller
    {
        MyPSEntities db = new MyPSEntities();
        //
        // GET: /TechLib/    
        public ActionResult Index()
        {
            ViewBag.TypeList = db.TechTypes.ToList();
            return View();
        }

        public ActionResult Detail(int id = 0)
        {
            var mode = db.Teches.Find(id);
            if (mode == null)
            {
                return HttpNotFound();
            }
            ViewBag.TypeList = db.TechTypes.ToList();
            return View(mode);
        }
    }
}
